"""
基础模式类
"""
from pydantic import BaseModel
from datetime import datetime
from typing import Optional


class BaseSchema(BaseModel):
    """基础模式类"""
    
    class Config:
        from_attributes = True


class TimestampMixin(BaseModel):
    """时间戳混入"""
    created_at: Optional[datetime] = None
    updated_at: Optional[datetime] = None


class IDMixin(BaseModel):
    """ID混入"""
    id: int
